﻿namespace Attacher
{
	using System.Windows;

	internal class MainWindowViewModelFactory : IMainWindowViewModelFactory
	{
		public MainWindowViewModel Create()
		{
			AttacherAutoStartService attacherAutoStartManager = new AttacherAutoStartService(new AutoStartService());
			RelayCommand exitRelayCommand = new RelayCommand((parameter) => Application.Current.Shutdown(0));
			RelayCommand changeAutoStartRelayCommand = new RelayCommand((parameter) => attacherAutoStartManager.ChangeApplicationAutoStart());
			MainWindowViewModel mainWindowViewModel = new MainWindowViewModel(exitRelayCommand, changeAutoStartRelayCommand);

			return mainWindowViewModel;
		}
	}
}
